<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="<?=domain?>static/style/manage.css" rel="stylesheet" type="text/css" />
<link href="<?=domain?>static/style/fancybox.css" rel="stylesheet" type="text/css" />
<link href="<?=domain?>static/style/datepicker.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?=domain?>static/scripts/core.js" charset="utf-8"></script>
<script type="text/javascript" src="<?=domain?>static/scripts/fancybox.js" charset="utf-8"></script>
<script type="text/javascript" src="<?=domain?>static/scripts/datepicker.js" charset="utf-8"></script>
<script type="text/javascript" src="<?=domain?>static/scripts/manage.js" charset="utf-8"></script>
<title><?=name?></title>
<body>
<div class="boxtitle">编辑预订</div>
<div class="area box">
<form name="edit" method="post" action="<?=domain?>index.php?c=subscribe&a=edit" onsubmit="return RequestPost('edit');">
	<input type="hidden" name="id" value="<?=$subscribe['id']?>"/>
	<div class="line">
		<div class="w m">登陆名</div>
		<div class="s h"><input type="text" name="user" value="<?=$subscribe['user']?>" maxlength="30"/></div>
		<div class="e c"><font color="red">*</font>,12306登陆名.</div>
	</div>
	<div class="line">
		<div class="w m">登陆密码</div>
		<div class="s h"><input type="text" name="password" value="<?=$subscribe['password']?>" maxlength="32"/></div>
		<div class="e c"><font color="red">*</font>,12306登陆密码.</div>
	</div>
	<div class="line">
		<div class="w m">车次</div>
		<div class="s h"><input type="text" name="train" value="<?=$subscribe['train']?>" maxlength="8"/></div>
		<div class="e c"><font color="red">*</font>,预订车次.</div>
	</div>
	<div class="line">
		<div class="w m">始发地</div>
		<div class="s h">
		  <select name="frae">
			<?php
				foreach($station as $key=>$value){
			?>
		    <option value="<?=($value['id'].'|'.$value['value'])?>"<?=($value['id']==$subscribe['frae']?' selected':'')?>><?=($char[$value['parent']]['name'].'--'.$value['name'])?></option>
		    <?php
				}
			?>
		  </select>
		</div>
		<div class="e c"><font color="red">*</font>,始发地</div>
	</div>
	<div class="line">
		<div class="w m">目的地</div>
		<div class="s h">
		 <select name="to">
			<?php
				foreach($station as $key=>$value){
			?>
		    <option value="<?=$value['id']?>"<?=($value['id']==$subscribe['to']?' selected':'')?>><?=($char[$value['parent']]['name'].'--'.$value['name'])?></option>
		    <?php
				}
			?>
		  </select>
		</div>
		<div class="e c"><font color="red">*</font>,目的地</div>
	</div>
	<div class="line">
		<div class="w m">出发时间</div>
		<div class="s h"><input type="text" name="leave" value="<?=date('Y-m-d',$subscribe['leave'])?>" maxlength="18"/></div>
		<div class="e c"><font color="red">*</font>,出发时间</div>
	</div>
	<div class="line">
		<div class="w m">席别</div>
		<div class="s h">
		  <select name="seat">
		   <?php
				foreach($seat as $key=>$value){
			?>
		    <option value="<?=$value['id']?>"<?=($value['id']==$subscribe['seat']?' selected':'')?>><?=$value['name']?></option>
		    <?php
				}
			?>
		  </select>
		</div>
		<div class="e c"><font color="red">*</font>,席别</div>
	</div>
	<div class="line">
		<div class="w m">票种</div>
		<div class="s h">
          <select name="kind">
		    <?php
				foreach($kind as $key=>$value){
			?>
		    <option value="<?=$value['id']?>"<?=($value['id']==$subscribe['kind']?' selected':'')?>><?=$value['name']?></option>
		    <?php
				}
			?>
		  </select>
		</div>
		<div class="e c"><font color="red">*</font>,乘坐人的种类.</div>
	</div>
	<div class="line">
		<div class="w m">姓名</div>
		<div class="s h"><input type="text" name="name" value="<?=$subscribe['name']?>" maxlength="18"/></div>
		<div class="e c"><font color="red">*</font>,乘坐人的名称</div>
	</div>
	<div class="line">
		<div class="w m">证件类型</div>
		<div class="s h">
          <select name="certificate">
		    <?php
				foreach($certificate as $key=>$value){
			?>
		    <option value="<?=$value['id']?>"<?=($value['id']==$subscribe['certificate']?' selected':'')?>><?=$value['name']?></option>
		    <?php
				}
			?>
		  </select>
		</div>
		<div class="e c"><font color="red">*</font>,使用的证件类型</div>
	</div>
	<div class="line">
		<div class="w m">证件号码</div>
		<div class="s h"><input type="text" name="number" value="<?=$subscribe['number']?>" maxlength="18"/></div>
		<div class="e c"><font color="red">*</font>,乘坐人的名称</div>
	</div>
	<div class="line">
		<div class="w m">联系电话</div>
		<div class="s h"><input type="text" name="mobile" value="<?=$subscribe['mobile']?>" maxlength="20"/></div>
		<div class="e c"><font color="red">*</font>,手机联系号码</div>
	</div>
</div>
<div class="boxbu">
	<input type="submit" name="save" value="确定" class="yellow"/>
</div>
</form>
</body>
</html>
<script language="JavaScript" type="text/javascript">
 $('input[name="leave"]').DatePicker({
	position:'bottom',
	calendars:1,
	mode:'single',
	onBeforeShow:function(){
		$('input').DatePickerSetDate($('input[name="leave"]').val())
	},
	onChange:function(formated){
		formated=formated.toString();
		if(formated.indexOf('1970-01-01')==-1){
			$('input[name="leave"]').val(formated);
			$('input[name="leave"]').DatePickerHide();
		}
	}
});
</script>